import { PopupQuitLoginBase } from "./PopupQuitLogin.generated";

const { regClass, property } = Laya;

@regClass()
export class PopupQuitLogin extends PopupQuitLoginBase {


    onAwake(): void {
        this.init();
        this.addEventListener();
    }
    onDestroy(): void {
        this.removeEventListener();
    }

    public showView(): void {
        this.visible = true;
    }

    private init(): void {
        this.visible = false;
    }

    private addEventListener(): void {
        this.btnConfirm.on(Laya.Event.CLICK, this, this.onClickConfirmBtn);
        this.btnCancle.on(Laya.Event.CLICK, this, this.onClickCancleBtn);
    }
    private removeEventListener(): void {
        this.btnConfirm.off(Laya.Event.CLICK, this, this.onClickConfirmBtn)
        this.btnCancle.off(Laya.Event.CLICK, this, this.onClickCancleBtn)
    }

    private onClickConfirmBtn(): void {

    }

    private onClickCancleBtn(): void {
        this.visible = false;
    }
}